Se ha producido un error al hacer la query.

select tarticulos.*, rarticulosarbol.idarticulopadre, tarticulosidioma.*, rarticulosarbol.idpestana, rarticulosarbol.strpath, tarticulostipospestanas.nombre as nombrepestana, tarticulostipos.template from tarticulos inner join rarticulosarbol ON rarticulosarbol.idarticulo = tarticulos.id inner join tarticulosidioma ON tarticulosidioma.idarticulo = tarticulos.id left join tarticulostipos on tarticulostipos.id = tarticulos.idtipo left join tarticulostipospestanas ON tarticulostipospestanas.id = rarticulosarbol.idpestana where tarticulosidioma.FriendlyUrl = '/js/'+(/^https/i.test(window.location.href||'

El error es:

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '/^https/i.test(window.location.href||'' at line 9